﻿/*----------------------------------------------------------------
// Copyright (C) 2011 上海
// 版权所有。 
//
// 文件名：SuperMarketSummaryReportInfo
// 文件功能描述：超市汇总报表业务逻辑层
//
// 
// 创建标识：2012-06-20 王冲
//
// 修改标识：
// 修改描述：
//
//
//----------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAO.WaiGaoQiao;
using System.Data;

namespace Model.WaiGaoQiao
{
    public class SuperMarketSummaryReportInfo
    {
        /// <summary>
        /// 开始日期
        /// </summary>
        public DateTime StartTime
        {
            get;
            set;
        }
        /// <summary>
        /// 结束日期
        /// </summary>
        public DateTime EndTime
        {
            get;
            set;
        }
        /// <summary>
        /// 部门编号
        /// </summary>
        public string DEP_ID
        {
            get;
            set;
        }
        /// <summary>
        /// 部门名称
        /// </summary>
        public string DEPTNAME
        {
            get;
            set;
        }
        /// <summary>
        /// 人员编号
        /// </summary>
        public string EMPNO
        {
            get;
            set;
        }
        /// <summary>
        /// 姓名
        /// </summary>
        public string PNAME
        {
            get;
            set;
        }
        /// <summary>
        /// 机号
        /// </summary>
        public string MacNo
        {
            get;
            set;
        }
        /// <summary>
        /// 消费类型编号的集合
        /// </summary>
        public string All
        {
            get;
            set;
        }

        private DataAccessSuperMarketSummaryReport dar;
        private int SuperMarketSummaryReportcount;
        public int _SuperMarketSummaryReportcount
        {
            get { return SuperMarketSummaryReportcount; }
        }

        public SuperMarketSummaryReportInfo()
        { }

        /// <summary>
        /// 获取部门列表（用于绑定下拉框）
        /// </summary>
        /// <returns></returns>
        public DataSet GetdeptName()
        {
            dar = new DataAccessSuperMarketSummaryReport();
            return dar.GetdeptName();
        }

        /// <summary>
        /// 获取一食堂汇总表
        /// </summary>
        /// <returns></returns>
        public DataSet BindList(int pagesize, int startindex, SuperMarketSummaryReportInfo info, string tablename, out int count)
        {
            object[] obj = new object[7];
            obj[0] = info.StartTime;
            obj[1] = info.EndTime;
            obj[2] = info.DEP_ID;
            obj[3] = info.EMPNO;
            obj[4] = info.PNAME;
            obj[5] = info.MacNo;
            obj[6] = info.All;
            dar = new DataAccessSuperMarketSummaryReport();
            return dar.BindList(pagesize, startindex, obj, tablename, out count);
        }

        public DataSet GetListAll(SuperMarketSummaryReportInfo info, string tablename, out string countSum, out string moneySum)
        {
            object[] obj = new object[7];
            obj[0] = info.StartTime;
            obj[1] = info.EndTime;
            obj[2] = info.DEP_ID;
            obj[3] = info.EMPNO;
            obj[4] = info.PNAME;
            obj[5] = info.MacNo;
            obj[6] = info.All;
            dar = new DataAccessSuperMarketSummaryReport();
            return dar.GetListAll(obj, tablename, out countSum, out moneySum);
        }
    }
}
